package com.pokemon.server;

import javax.xml.ws.Endpoint;

/**
 *
 * @author Ladislav
 */
public class ServiceServer 
{
    private TrainerServiceImpl trainerService;
    private PokemonServiceImpl pokemonService;
    
    public ServiceServer(TrainerServiceImpl trainerService, PokemonServiceImpl pokemonService) {
        this.trainerService = trainerService;
        this.pokemonService = pokemonService;
    }
    
   protected void run() {
        String trainerAddress  = "http://localhost:9000/pa165";
        Endpoint.publish(trainerAddress, (Object) trainerService);
        
        String pokemonAddress  = "http://localhost:9001/pa165";
        Endpoint.publish(pokemonAddress, (Object) pokemonService);
    }

}
